<div class="">
  <!--<nz-spin [nzTip]="'正在导入请等待...'" [nzSize]="'large'">-->

  <nz-collapseset>
    <nz-collapse [nzTitle]="'查询'" [nzActive]="true">
      <form nz-form [nzLayout]="'inline'">
        <div nz-row>

          <div nz-form-item nz-col [nzSpan]="4">
            <div nz-form-label nz-col [nzSm]="9" [nzXs]="6">
              <label>操作类型</label>
            </div>
            <div nz-form-control nz-col [nzSm]="12" [nzXs]="12">
              <nz-select nzAllowClear [nzPlaceHolder]="'请选择'" [(ngModel)]="pointDefendBean.operationType" [nzShowSearch]="true"
                         name="isRead">
                <nz-option [nzLabel]="'PC端'" [nzValue]="'0'" [nzDisabled]="false">
                </nz-option>
                <nz-option [nzLabel]="'APP端'" [nzValue]="'1'" [nzDisabled]="false">
                </nz-option>
              </nz-select>
            </div>
          </div>
          <button nz-button [nzSize]="'middle'" [nzType]="'primary'" (click)="queryData()" >查询</button>
        </div>

      </form>
    </nz-collapse>
  </nz-collapseset>

  <ul nz-menu [nzMode]="'horizontal'">
    <li nz-menu-item (click)="add(title, content, footer)">
      <i class="anticon anticon-plus"></i>添加
    </li>

    <li nz-menu-item (click)="delete()">
      <i class="anticon anticon-copy"></i>删除
    </li>
  </ul>

  <nz-table #nzTable [nzDataSource]="pointData" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false"
            (nzDataChange)="displayDataChange($event)">
    <thead nz-thead>
    <tr>
      <th nz-th  [nzCheckbox]="true">
        <label nz-checkbox [(ngModel)]="allChecked" [nzIndeterminate]="indeterminate" (ngModelChange)="checkAll($event)"  >
        </label>
      </th>
      <th nz-th>
        <span>操作类型</span>
      </th>
      <th nz-th>
        <span>操作角色</span>
      </th>
      <th nz-th>
        <span>操作内容</span>
      </th>
      <th nz-th>
        <span>唯一标识</span>
      </th>
      <th nz-th [nzWidth]="'500px'">
        <span>实体字段</span>
      </th>
      <th nz-th>
        <span>分数</span>
      </th>
      <th nz-th>
        <span>操作</span>
      </th>
    </tr>
    </thead>

    <tbody nz-tbody >
    <tr nz-tbody-tr *ngFor="let data of pointData">
      <td nz-td [nzCheckbox]="true">
        <label nz-checkbox  nz-checkbox [nzDisabled]="data.disabled" [(ngModel)]="data.checked" (ngModelChange)="refreshStatus($event)">
        </label>
      </td>
      <td nz-td>{{data.operationType}}</td>
      <td nz-td>{{data.operationRole}}</td>
      <td nz-td>{{data.operationContent}}</td>
      <td nz-td>{{data.identification}}</td>
      <td nz-td>{{data.mustBean}}</td>
      <td nz-td>
        <span *ngIf="editRow!==data.id">{{data.mark}}</span>
        <span *ngIf="editRow===data.id">
              <nz-input [(ngModel)]="tempEditObject[data.id].mark"></nz-input>
            </span>
      </td>
      <td nz-td>
            <span *ngIf="editRow!==data.id">
              <a (click)="edit(data)">修改</a>
            </span>
        <span *ngIf="editRow===data.id">
              <a (click)="save(data)">保存</a>
              <span nz-table-divider></span>
                <nz-popconfirm [nzTitle]="'确定取消?'" (nzOnConfirm)="cancel(data)">
                  <a nz-popconfirm>取消</a>
                </nz-popconfirm>
            </span>
      </td>
    </tr>
    </tbody>
  </nz-table>


  <nz-pagination [nzPageIndex]="pointDefendBean.currentPage" nzShowTotal [nzTotal]="total" nzShowSizeChanger
                 (nzPageSizeChange)="nzPageSizeChange($event)" (nzPageIndexChange)="nzPageIndexChange($event)"
                 (nzPageIndexClickChange)="nzPageIndexClickChange($event)" [nzPageSize]="pointDefendBean.pageSize"></nz-pagination>


  <!--添加界面-->
  <ng-template #title>
    <span>{{modelTitle}}</span>
  </ng-template>
  <ng-template #content>
    <point-defend-add *ngIf="modal==0"  (outPut)="addOutPut($event)"></point-defend-add>
  </ng-template>
  <ng-template #footer>
    <div>
    </div>
  </ng-template>

</div>
